package com.suse.ecommerce.controller;

import com.suse.ecommerce.pojo.OrderProduct;
import com.suse.ecommerce.serviceImp.OrderItemServiceImpl;
import com.suse.ecommerce.serviceImp.OrderServiceImpl;
import com.suse.ecommerce.uilts.Msg;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/orderProduct")
@RestController
public class OrderProductController {
    @Autowired
    OrderItemServiceImpl orderItemService;

    @RequestMapping("/queryOrderProducts")
    public Msg queryOrderProducts(OrderProduct orderProduct){
        List<OrderProduct>  list = orderItemService.queryOrderProducts(orderProduct);
        return Msg.success("成功").add("orderProducts",list);
    }

}
